<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td bgcolor="#cccccc" width="200" valign="top" border="0"><!-- variable RHS Menu -->
      <?php require('templates/menu1.php');?>
    </td>
    <td valign="top" style="padding:30px 30px 30px 30px;"><!--content-->
      <table align="left">
        <tr>
          <td><img src="images/order_status.png"> 
        </tr>
        <tr>
          <td height="60">&nbsp;</td>
        </tr>
        <tr>
          <td align="center">
            <?php 
$sql = mysql_query('SELECT * FROM laptop where user_id="'.trim($_SESSION['user_id']).'"');
$result = mysql_fetch_row($sql);

if($result!="")
{
if ($result[8] == "approve" && $result[9] != "1" && $result[10] != "1") {
    $bgcolor1 = "bgcolor='#FF6600'";
}
 elseif ($result[8] == "approve" && $result[9] == "1" && $result[10] != "1") {
    $bgcolor1 = "bgcolor='#FF6600'";
	$bgcolor2 = "bgcolor='#FF9900'";
} elseif ($result[8] == "approve" && $result[9] == "1" && $result[10] == "1" && $result[12] != "1") {
	$bgcolor1 = "bgcolor='#FF6600'";
	$bgcolor2 = "bgcolor='#FF9900'";
    $bgcolor3 = "bgcolor='#FFCC00'";
	
} elseif ($result[8] == "approve" && $result[9] == "1" && $result[10] == "1" && $result[12] == "1") {
	$bgcolor1 = "bgcolor='#FF6600'";
	$bgcolor2 = "bgcolor='#FF9900'";
    $bgcolor3 = "bgcolor='#FFCC00'";
	$bgcolor4 = "bgcolor='#669966'";
}
elseif ($result[8] == "disapprove")
{
    $bgcolor = "";
}
else
{
    $bgcolor = "bgcolor='#FF3300'";

}
}
else
{
    $bgcolor = "";
}
$sql2= mysql_query('SELECT * FROM approved_laptops where user_id="'.trim($_SESSION['user_id']).'"');
$result2 = mysql_fetch_row($sql2);

$sql3= mysql_query('SELECT * FROM assigned_laptops where user_id="'.trim($_SESSION['user_id']).'"');
$result3 = mysql_fetch_row($sql3);

$sql4= mysql_query('SELECT * FROM received_laptop where user_id="'.trim($_SESSION['user_id']).'"');
$result4= mysql_fetch_row($sql4);

$sql5= mysql_query('SELECT * FROM dispatched_laptop where user_id="'.trim($_SESSION['user_id']).'"');
$result5 = mysql_fetch_row($sql5);
?>
<table border="0" width="480"><tr><td><b>Laptop Model :</b></td><td><?php echo $result[4]; ?></td></tr><tr><td><b>Serial No. :</b></td><td><?php echo $result[13]; ?></td></tr><tr><td><b>Report To Location :</b></td><td><?php echo $result[16]; ?></td></tr><tr><td><b>Dispatched Date :</b></td><td><?php echo $result[7]; ?></td></tr></table>
<br><br>
            <table border="0" width="700" cellpadding="0" cellspacing="0">
              <tr>
			  <td width="75" align="center" style="color:#3F3F3F; padding-bottom:5px; padding-top:5px;"></td>
                <td width="75" align="center" style="color:#3F3F3F; padding-bottom:5px; padding-top:5px;"><strong>Request Recieved</strong></td>
                <td width="75" align="center" style="color:#3F3F3F"><strong>Request Approved</strong></td>
                <td width="75" align="center" style="color:#3F3F3F"><strong>Laptop Dispatched</strong></td>
                <td width="75" align="center" style="color:#3F3F3F"><strong>Laptop Recieved</strong></td>
                <td width="75" align="center" style="color:#3F3F3F"><strong>Delivered</strong></td>
              </tr>
              <tr>
			    <td width="75" height="20"><b>Status</b></td>
                <td width="75" height="20" <?php echo $bgcolor;?> style="border: #000000 1px solid;"></td>
                <td width="75" height="20" <?php echo $bgcolor1;?> style="border: #000000 1px solid;"></td>
                <td width="75" height="20" <?php echo $bgcolor2;?> style="border: #000000 1px solid;"></td>
                <td width="75" height="20" <?php echo $bgcolor3;?> style="border: #000000 1px solid;"></td>
                <td width="75" height="20" <?php echo $bgcolor4;?> style="border: #000000 1px solid;"></td>
              </tr>
			   <tr>
			    <td width="75" height="20"><b>Date</b></td>
                <td width="75" height="20"><?php echo $result[14]; ?></td>
                <td width="75" height="20"><?php echo $result2[3]; ?></td>
                <td width="75" height="20"><?php echo $result3[3]; ?></td>
                <td width="75" height="20"><?php echo $result4[2]; ?></td>
                <td width="75" height="20"><?php echo $result5[4]; ?></td>
              </tr>
			  <tr>
			    <td width="75" height="20"><b>Depot</b></td>
                <td width="75" height="20"><?php echo $result[15]; ?></td>
                <td width="75" height="20"><?php echo $result2[4]; ?></td>
                <td width="75" height="20"><?php echo $result3[4]; ?></td>
                <td width="75" height="20"><?php echo $result4[3]; ?></td>
                <td width="75" height="20"><?php echo $result5[5]; ?></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <!--end content-->
    </td>
  </tr>
</table>
</td>
</tr>
</table>
